﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace W1
{
    public partial class Form12 : Form
    {
        DataTable dt = new DataTable();
        public Form12()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            DataTable dt = new DataTable();
            string sql = string.Format("select IDK 序号,name 姓名,kaoshiname 考试名称,tongguo 通过时间,bukaoji 补考记录 from Kaoshi K,jiating j where k.id=j.id and  j.name = '{0}'", textBox1.Text);
            dt = DBHelper.SelectByAdapter(sql);
            dataGridView1.DataSource = dt;
        }

        private void Form12_Load(object sender, EventArgs e)
        {
            string sql = "select IDK 序号,name 姓名,kaoshiname 考试名称,tongguo 通过时间,bukaoji 补考记录 from Kaoshi K,jiating j where k.id=j.id";
            dt =DBHelper.SelectByAdapter(sql);
            dataGridView1.DataSource = dt;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Form4 form4 = new Form4();
            form4.Show();
            Hide();
        }
    }
}
